﻿<ribbon:RibbonWindow x:Class="Renci.iRods.Studio.Views.ShellWindow"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"  
			 xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
			 xmlns:common="clr-namespace:Renci.iRods.Studio.Common;assembly=Renci.iRods.Studio.Common"
			 xmlns:views="clr-namespace:Renci.iRods.Studio.Views"
			 xmlns:prism="http://www.codeplex.com/prism"
			 xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
			 Title="iRods Studio"
			 mc:Ignorable="d" 
		Width="800" Height="600">
	<ribbon:RibbonWindow.Resources>
		<ResourceDictionary Source="/Renci.iRods.Studio;component/Resources/View.Resources.xaml" />
	</ribbon:RibbonWindow.Resources>
	<i:Interaction.Triggers>
		<prism:InteractionRequestTrigger SourceObject="{Binding ShowConnectionManagerRequest}">
			<common:DialogWindowAction WindowDataType="{x:Type views:ConnectionProfileManagerView}"/>
		</prism:InteractionRequestTrigger>

		<prism:InteractionRequestTrigger SourceObject="{Binding ShowConnectionSelectionRequest}">
			<common:DialogWindowAction WindowDataType="{x:Type views:ConnectionProfileSelectionView}" />
		</prism:InteractionRequestTrigger>

		<prism:InteractionRequestTrigger SourceObject="{Binding ShowMessageBoxRequest}">
			<common:DialogWindowAction />
		</prism:InteractionRequestTrigger>

	</i:Interaction.Triggers>
	<Grid>
		<DockPanel>
			<DockPanel DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None">
				<ribbon:Ribbon x:Name="ApplicationRibbon" 
				Grid.Row="0"  
				Background="Transparent"  
				prism:RegionManager.RegionName="RibbonRegion">

					<!-- Ribbon ApplicationMenu (defined here) -->
					<ribbon:Ribbon.ApplicationMenu>
						<ribbon:RibbonApplicationMenu >
							<ribbon:RibbonApplicationMenuItem Header="E_xit" x:Name="ExitMenuItem" />
						</ribbon:RibbonApplicationMenu>
					</ribbon:Ribbon.ApplicationMenu>

					<!-- Ribbon QuickAccessToolbar  (defined here)
			<ribbon:Ribbon.QuickAccessToolBar>
				<ribbon:RibbonQuickAccessToolBar>
					<ribbon:RibbonButton Command="{Binding NewCollection}" ToolTip="Create a new file (Ctrl+N)" SmallImageSource="Images\new.png" />
					<ribbon:RibbonButton Command="{Binding OpenCollection}" ToolTip="Open an existing file (Ctrl+O)" SmallImageSource="Images\open.png" />
					<ribbon:RibbonButton Command="{Binding SaveCollection}" ToolTip="Save the current file (Ctrl+S)" SmallImageSource="Images\save.png" />
					<ribbon:RibbonButton Command="{Binding PrintNote}" ToolTip="Print the current file (Ctrl+P)" SmallImageSource="Images\print.png" />
				</ribbon:RibbonQuickAccessToolBar>
			</ribbon:Ribbon.QuickAccessToolBar>-->

					<!-- Home Tab (defined here) -->
					<ribbon:RibbonTab x:Name="HomeTab"  Header="Home">
						<ribbon:RibbonGroup Header="Connection">
							<ribbon:RibbonButton Label="Connection Manager" Command="{Binding ShowConnectionManagerCommand}" />
							<ribbon:RibbonButton Label="Connect" Command="{Binding ShowConnectionSelectionCommand}" />
						</ribbon:RibbonGroup>
						<ribbon:RibbonGroup Header="Favorite Connections">
							<ItemsControl ItemsSource="{Binding FavoriteConnections}" >
								<ItemsControl.ItemTemplate>
									<DataTemplate>
										<ribbon:RibbonButton Label="{Binding Name}" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.ConnectCommand}" CommandParameter="{Binding}"/>
									</DataTemplate>
								</ItemsControl.ItemTemplate>
							</ItemsControl>
						</ribbon:RibbonGroup>

					</ribbon:RibbonTab>
					<ribbon:RibbonTab x:Name="ViewTab"  Header="View">
					</ribbon:RibbonTab>
				</ribbon:Ribbon>
			</DockPanel>
			<DockPanel DockPanel.Dock="Bottom" KeyboardNavigation.TabNavigation="None">
				<ContentPresenter Name="StatusBar" />
			</DockPanel>

			<DockPanel KeyboardNavigation.TabNavigation="None">
                <ad:DockingManager RenderTransformOrigin="0,0" Margin="0,0,0,0">
					<ad:ResizingPanel Orientation="Vertical">
						<ad:ResizingPanel Orientation="Horizontal" >
							<ad:DockablePane prism:RegionManager.RegionName="DockableRegionLeft" />
							<ad:DocumentPane OverridesDefaultStyle="True" prism:RegionManager.RegionName="DockableRegionDocument" />
							<ad:DockablePane prism:RegionManager.RegionName="DockableRegionRight" />
						</ad:ResizingPanel>
						<ad:DockablePane prism:RegionManager.RegionName="DockableRegionBottom"/>
					</ad:ResizingPanel>
				</ad:DockingManager>
			</DockPanel>
		</DockPanel>
	</Grid>
</ribbon:RibbonWindow>
